home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / language / embedded / develop / symcoff.arc / PSCNHDR.H < prev    next >
C/C++ Source or Header  |  1988-08-30  |  2KB  |  80 lines

  1. /* Copyright 1985 by Motorola Inc. */ 
  2. /* @(#)pscnhdr.h    2.1 */
  3. struct scnhdr {
  4.     char        s_name[8];    /* section name */
  5.     long        s_paddr;    /* physical address */
  6.     long        s_vaddr;    /* virtual address */
  7.     long        s_size;        /* section size */
  8.     long        s_scnptr;    /* file ptr to raw data for section */
  9.     long        s_relptr;    /* file ptr to relocation */
  10.     long        s_lnnoptr;    /* file ptr to line numbers */
  11.     unsigned short    s_nreloc;    /* number of relocation entries */
  12.     unsigned short    s_nlnno;    /* number of line number entries */
  13.     long        s_flags;    /* flags */
  14.     };
  15.  
  16. #define    SCNHDR    struct scnhdr
  17. #define    SCNHSZ    sizeof(SCNHDR)
  18.  
  19.  
  20.  
  21.  
  22. /*
  23.  * Define constants for names of "special" sections
  24.  */
  25.  
  26. #define _TEXT ".text"
  27. #define _DATA ".data"
  28. #define _BSS  ".bss"
  29. #define _TV   ".tv"
  30.  
  31.  
  32.  
  33.  
  34. /*
  35.  * The low 4 bits of s_flags is used as a section "type"
  36.  */
  37.  
  38. #define STYP_REG    0x00        /* "regular" section:
  39.                         allocated, relocated, loaded */
  40. #define STYP_DSECT    0x01        /* "dummy" section:
  41.                         not allocated, relocated,
  42.                         not loaded */
  43. #define STYP_NOLOAD    0x02        /* "noload" section:
  44.                         allocated, relocated,
  45.                          not loaded */
  46. #define STYP_GROUP    0x04        /* "grouped" section:
  47.                         formed of input sections */
  48. #define STYP_PAD    0x08        /* "padding" section:
  49.                          not allocated, not relocated,
  50.                          loaded */
  51. #define STYP_COPY    0x10        /* "copy" section:
  52.                         for decision function used
  53.                         by field update;  not
  54.                         allocated, not relocated,
  55.                         loaded;  reloc & lineno
  56.                         entries processed normally */
  57. #define    STYP_TEXT    0x20        /* section contains text only */
  58. #define STYP_DATA    0x40        /* section contains data only */
  59. #define STYP_BSS    0x80        /* section contains bss only */
  60. #define STYP_ASCT    0x100        /* absolute section */
  61. #define STYP_CSCT    0x200        /* unnamed common section */
  62. #define STYP_UNCOMM    0x400        /* uninitialized named common section */
  63. #define STYP_DPAGE    0x800        /* direct page */
  64.  
  65. /*
  66.  *  In a minimal file or an update file, a new function
  67.  *  (as compared with a replaced function) is indicated by S_NEWFCN
  68.  */
  69.  
  70. #define S_NEWFCN  0x10
  71.  
  72. /*
  73.  * In 3b Update Files (output of ogen), sections which appear in SHARED
  74.  * segments of the Pfile will have the S_SHRSEG flag set by ogen, to inform
  75.  * dufr that updating 1 copy of the proc. will update all process invocations.
  76.  */
  77.  
  78. #define S_SHRSEG    0x20
  79. /* Copyright 1985 by Motorola Inc. */
  80.